package com.andy.ui.base;

import android.os.Bundle;

import com.trello.rxlifecycle3.components.support.RxAppCompatActivity;

import androidx.annotation.Nullable;
import butterknife.ButterKnife;
import butterknife.Unbinder;

/**
 * @Author: luofan
 * @CreateDate: 2020/3/23 15:23
 * @Description:
 */
public abstract class BaseActivity extends RxAppCompatActivity implements PageViewCreator {

    private Unbinder unBinder;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        initData();
        setContentView(getLayoutId());
        unBinder = ButterKnife.bind(this);
        initView();
        initLogic();
    }

    @Override
    public void reload() {

    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        unBinder.unbind();
    }
}
